<div class="pets container">
	
	<h2><?php echo __d('admin', 'Create Pet'); ?></h2>
	
<?php
	$formOptions = array (
		'inputDefaults' => array (
			'div' => array('class' => 'form-group'),
			'class' => 'form-control'
		)
	);
	
	$formElements = array (
		'name' => array(
			'class' => 'form-control input-lg', 
			'placeholder' => __('Name')
		),
		'description' => array(
			
		),
		'Picture.file' => array(
			'class' => '',
			'type' => 'file',
			'label' => __('Picture'),
			'after' => '<p class="help-block">' . __('Upload an image from your computer') . '</p>'
		),
		
	);
	
?>
	<?php echo $this->Form->create('Pet', $formOptions); ?>
	<div class="row row-offcanvas row-offcanvas-right">
		<div class="col-xs-12 col-sm-8">
			<?php 
			foreach($formElements as $field => $options) {
				echo $this->Form->input($field, $options) . "\n\n";	
			}
			?>
			<div class="form-group">
				<label for="PetBirthdate"><?php echo __d('admin', 'Birthdate'); ?></label>
				<?php echo $this->Form->input('birthdate', array('label' => false, 'div' => array(), 'class' => 'datepicker form-control', 'between' => '')); ?>
			</div>
			<?php
			echo $this->Form->submit(__d('admin', 'Create'), array('class' => 'btn btn-primary'));
			?>
		</div>
	
		<div class="col-xs-12 col-sm-4 sidebar-offcanvas" id="sidebar" role="navigation">
			<!-- User -->
			<div class="panel panel-default">
				<div class="panel-heading"><b>User</b></div>
				<div class="panel-body">
					<div class="form-group">
						<?php echo $this->Form->input('user_id', array('class' => 'form-control input-sm', 'label' => false)); ?>
					</div>
					<p>
						<a href="#" class="btn btn-link"><span class="glyphicon glyphicon-plus"></span> Add New User</a>
					</p>
				</div>
			</div>
		</div>
	</div>
	<?php echo $this->Form->end(); ?>
	
</div>
